using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace HotUpdate.Editor
{
    public partial class CreateNewHotUpdateScriptWindow
    {
        private string m_EventArgsClassName = "";
        private string m_EventArgsNameSpace = "";
        [ScriptCreator]
        private void CreateCreateNewEventArgsScriptView(string fileName)
        {
            m_EventArgsClassName = EditorGUILayout.TextField("事件类名（英文字母）", m_EventArgsClassName);
            m_EventArgsNameSpace = EditorGUILayout.TextField("事件命名空间（英文字母）", m_EventArgsNameSpace);
            if (GUILayout.Button("创建事件"))
            {
                CreateNewEventArgsScript(fileName, m_EventArgsClassName, m_EventArgsNameSpace);
            }
        }
        private void CreateNewEventArgsScript(string fileName,string className,string nameSpace)
        {
            CreateNewTemplateScript("TemplateEventArgs.cs", fileName, new KeyValuePair<string, string>("#CLASS_NAME#", className)
                , new KeyValuePair<string, string>("#NAMESPACE_NAME#", nameSpace));
        }
    }

}
